{
    var events = [1,2,3,4,5];

    //ES3 ES5
    var odds = events.map(function(v){
        return v + 1;
    })
    console.log(events, odds);
}

//ES6
{
    let events = [1,2,3,4,5];
    let odds = events.map((v) => v+1);
    console.log(events, odds);
}


{
    var factory = function(){
        this.a = 'a+';
        this.b = 'b';
        this.c = {
            a: 'a-',
            b: function(){
                return this.a;
            }
        }
    }
    console.log("ES5>>>"+new factory().c.b());
};

{
    var factory = function(){
        this.a = 'a+';
        this.b = 'b';
        this.c = {
            a: 'a',
            b: () => {
                return this.a;
            }
        }
    }
    console.log("ES6>>>"+new factory().c.b());
}